package com.gandong8.hbase.tool.service;

import com.gandong8.hbase.tool.domain.*;
import org.apache.hadoop.hbase.ClusterStatus;

import java.util.List;
import java.util.Set;

public interface HbaseServiceInter {
    boolean createTable(String tableName, Set<String> familySet) ;

    boolean createTable(Class<?> clazz);

    boolean deleteTable(String tableName);

    List<String> listTable();

    List<HbaseTableInfo> listTableInfo();

    HbaseClusterInfo getClusterInfo();

    boolean enableTable(String tableName);

    boolean disableTable(String tableName);

    List<String> listFamily(String tableName);

    List<String> listFamily(Class<?> clazz);

    boolean delete(Class<?> clazz, List<String> rowKeys);

    boolean delete(String tableName, List<String> rowKeys);

    boolean delete(Class<?> clazz, String rowKey);

    boolean delete(String tableName, String rowKey);

    boolean deleteColumn(String tableName, String rowKey, String family, String qualifier);

    <T> void delete(T obj);

    <T> boolean save(T obj);

    <T> boolean save(List<T> objList);

    boolean save(String tableName, String rowKey, String[] columns, String[] values);

    <T> T getRecord(Class<T> clazz, String rowKey);

    <T> T getRecord(T obj);

    <T> List<T> getRecords(Class<T> clazz, List<String> rowKeys);

    List<HbaseCell> getCells(String tableName, String rowKey);

    <T> List<T> search(Class<T> clazz, HbaseQuery query);

    List<HbaseRow> search(String tableName, HbaseQuery query);
}
